package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
 * @ClassName: Current_Params_RD_Analyzer
 * @Description: 4E/4F. 校表相关参数信息(本组信息仅支持点对点方式)
 * @author 高意
 * @date 2014-9-11 上午10:00:14
 * 
 */
public class Current_Params_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String paramsData = ackBS.substring(DATABITSTART, DATABITSTART + 44);

		int params[] = new int[11];

		int j = 0;
		for (int i = 0; i < 11; i++) {
			String data = paramsData.substring(j, j + 4);
			String param = data.substring(2, 4) + data.substring(0, 2);

			params[i] = Integer.parseInt(param, 16);

			j = j + 4;
		}

		result.setCurrentParams(params);
	}
}
